<!doctype html>
<html lang="en" ng-app="myApp">
<head>
  <meta charset="utf-8">
  <title>Modal | Onsen UI</title>
  <link rel="stylesheet" href="../styles/app.css"/>
  <link rel="stylesheet" href="../../../../build/css/onsenui.css">
  <link rel="stylesheet" href="../../../../build/css/onsen-css-components.css">

  <script src="../../../../build/js/onsenui.js"></script>
  <script src="../../../../node_modules/angular/angular.js"></script>
  <script src="../../../../build/js/angular-onsenui.js"></script>
  <script src="../app.js"></script>

  <script>
    angular.module('myApp').controller('PageController', function($scope) {
      $scope.log = function(msg) {
        console.log(msg);
      };
    });
  </script>
</head>

<body ng-controller="PageController">
  <ons-page>
    <ons-toolbar>
      <div class="center">Modal</div>
    </ons-toolbar>

    <p style="text-align: center">
      <ons-button modifier="light" ng-click="modal.toggle()">Open Modal</ons-button>
    </p>
  </ons-page>

  <ons-modal var="modal" ons-postshow="log($event)">
    <ons-icon icon="gear" spin="true" style="line-height: 20px; vertical-align: middle;"></ons-icon>
    <span style="line-height: 20px; font-size: 15px;">Loading...</span>
    <ons-button ng-click="modal.hide()">Close</ons-button>
  </ons-modal>
</body>
</html>
